// src/router/index.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

//基础功能
import Usermanagement from '../views/Usermanagement.vue'
import User from '../views/User.vue'//用户管理
import Driver from '../views/Driver.vue'//司机及车辆管理
import Orders from '../views/Orders.vue'//订单管理
import Finance from '../views/Finance.vue'//财务管理
import Foundation from '../views/Foundation.vue'//基础信息配置

//运营管理
import Operationalstrategy from '../views/Operationalstrategy.vue'
import Pricing from '../views/Pricing.vue'//定价策略
import Dispatch from '../views/Dispatch.vue'//派单策略


//统计分析
import Statistics from '../views/Statistics.vue'
import Serviceevaluation from '../views/Serviceevaluation.vue'//服务评价指标
import Revenue from '../views/Revenue.vue'//营收情况


//运营驾驶舱
import Operationalcockpit from '../views/Operationalcockpit.vue'
import Cockpit from '../views/Cockpit.vue'//驾驶舱
import Monthlyactiveusers from '../views/Monthlyactiveusers.vue'//用户月活
import Amountofcompletion from '../views/Amountofcompletion.vue'//订单及订单完成量
import Turnoversituation from '../views/Turnoversituation.vue'//流水情况
import Bear from '../views/Bear.vue'//司机人均承担




Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home,

  // },
  {
    path: '/usermanagement',
    name: 'Usermanagement',
    component: Usermanagement,
	
    children: [
      {
        path: '/user',
        name: 'User',
        component: User,
		
      },
      {
        path: '/driver',
        name: 'Driver',
        component: Driver,
		
      },
	  {
	    path: '/orders',
	    name: 'Orders',
	    component: Orders
	  },
	  {
	    path: '/finance',
	    name: 'Finance',
	    component: Finance
	  },
	  {
	    path: '/foundation',
	    name: 'Foundation',
	    component: Foundation
	  },
    ]
  },
  {
    path: '/operationalstrategy',
    name: 'Operationalstrategy',
    component: Operationalstrategy,
    children: [
      {
        path: '/pricing',
        name: 'Pricing',
        component: Pricing
      },
	  {
	    path: '/dispatch',
	    name: 'Dispatch',
	    component: Dispatch
	  },
    ]
  },
  {
    path: '/statistics',
    name: 'Statistics',
    component: Statistics,
    children: [
      {
        path: '/serviceevaluation',
        name: 'Serviceevaluation',
        component: Serviceevaluation
      },
  	  {
  	    path: '/revenue',
  	    name: 'Revenue',
  	    component: Revenue
  	  },
    ]
  },
  {
    path: '/operationalcockpit',
    name: 'Operationalcockpit',
    component: Operationalcockpit,
    children: [
      {
        path: '/cockpit',
        name: 'Cockpit',
        component: Cockpit
      },
  	  {
  	    path: '/monthlyactiveusers',
  	    name: 'Monthlyactiveusers',
  	    component: Monthlyactiveusers
  	  },
	  {
	    path: '/amountofcompletion',
	    name: 'Amountofcompletion',
	    component: Amountofcompletion
	  },
	  {
	    path: '/turnoversituation',
	    name: 'Turnoversituation',
	    component: Turnoversituation
	  },
	  {
	    path: '/bear',
	    name: 'Bear',
	    component: Bear
	  },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router